In Epistle of Barnabas 4:14 (A.D. 130), we first find the formula "it is written" used in reference to a New Testament book (Matthew 22:14 in this case).
(The Origin of the Bible: Newly Updated by F. F. Bruce, J. I. Packer, Philip W. Comfort, and Carl F. H. Henry, 2020. The Canon of the New Testament by Milton C. Fisher, Pages 68-72.)